# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:ft=tcl:et:sw=4:ts=4:sts=4

PortSystem      1.0
PortGroup       cmake 1.0

name            jasper
version         2.0.14
categories      graphics
platforms       darwin
license         JasPer-2
maintainers     {jmr @jmroot} openmaintainer
description     Library for manipulating JPEG-2000 images

long_description \
    The JasPer Project is an open-source initiative to provide a free \
    software-based reference implementation of the codec specified in the \
    JPEG-2000 Part-1 standard (i.e., ISO/IEC 15444-1).

homepage        http://www.ece.uvic.ca/~mdadams/jasper/
master_sites    ${homepage}software/

checksums       rmd160 0b2b51b22b7421773255955de6bad27f9b434712 \
                sha256 2a1f61e55afe8b4ce8115e1508c5d7cb314d56dfcc2dd323f90c072f88ccf57b

depends_lib     path:lib/libjpeg.dylib:jpeg

patchfiles      patch-jiv.c.diff

cmake.out_of_source yes

configure.args-append   -DJAS_ENABLE_AUTOMATIC_DEPENDENCIES=false \
                        -DGLUT_glut_LIBRARY=/System/Library/Frameworks/GLUT.framework \
                        -DJAS_ENABLE_DOC=false

test.run        yes

variant docs description {build documentation} {
    depends_build-append                \
        port:doxygen                    \
        port:texlive-latex              \
        port:texlive-latex-extra        \
        port:texlive-fonts-recommended  \
        port:texlive-latex-recommended

    configure.args-delete   -DJAS_ENABLE_DOC=false
    configure.args-append   -DJAS_ENABLE_DOC=true
}

livecheck.type   regex
livecheck.regex  {JasPer ([.\d]+)}
